package com.beichuan_travel.utils;

import ch.qos.logback.core.util.COWArrayList;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class ArraysUtils {

    public <E> void reverse(List<E> list) {
        E e1;
        int length = list.size();
        for (int i = 0; i < length / 2; i++) {
            e1 = list.get(length - 1 - i);
            list.set(length-1-i, list.get(i));
            list.set(i, e1);
        }
        System.out.println("dianyong");
    }
}
